package com.aspose.cells.a.d;

import com.aspose.cells.Color;

public class zcl {
   private zcb a;
   private com.aspose.cells.b.a.d.zh b;
   private zcm c;
   private zck d;

   public zcl(zcb var1, zck var2) {
      this.a = var1;
      this.d = var2;
   }

   public void a() throws Exception {
      this.a(com.aspose.cells.b.a.b.zo.a(), com.aspose.cells.b.a.b.zt.a());
   }

   public void a(com.aspose.cells.b.a.b.zo var1, com.aspose.cells.b.a.b.zt var2) throws Exception {
      if (this.d.d()) {
         this.a.a(this.a.c().i());
         this.T().a(this.a.c().i());
      }

      this.b = new com.aspose.cells.b.a.d.zh();
      this.c = new zcm(this.b);
      this.d.a(var1, var2);

      for(int var3 = 0; var3 < this.U().k(); ++var3) {
         this.a(this.U().a(var3));
      }

      this.b.a();
   }

   private void a(zcj var1) throws Exception {
      if (var1.c() > 0) {
         this.b.b(var1.e(), 0, var1.c());
         this.b.b(this.b.i() - (long)var1.c());
      }

      switch(var1.d()) {
      case 30:
         this.b();
      case 53:
      case 55:
      case 263:
      case 313:
      case 561:
      case 564:
      case 1078:
      case 1574:
      default:
         break;
      case 247:
         this.m();
         break;
      case 258:
         this.w();
         break;
      case 259:
         this.d();
         break;
      case 262:
         this.x();
         break;
      case 264:
         this.A();
         break;
      case 295:
         this.c();
         break;
      case 301:
         this.t();
         break;
      case 302:
         this.z();
         break;
      case 322:
         this.s();
         break;
      case 496:
         this.u();
         break;
      case 505:
         this.r();
         break;
      case 513:
         this.v();
         break;
      case 521:
         this.y();
         break;
      case 523:
         this.e();
         break;
      case 524:
         this.f();
         break;
      case 525:
         this.i();
         break;
      case 526:
         this.j();
         break;
      case 527:
         this.g();
         break;
      case 529:
         this.k();
         break;
      case 531:
         this.F();
         break;
      case 532:
         this.E();
         break;
      case 762:
         this.o();
         break;
      case 763:
         this.q();
         break;
      case 764:
         this.p();
         break;
      case 804:
         this.I();
         break;
      case 805:
         this.H();
         break;
      case 1040:
         this.h();
         break;
      case 1042:
         this.l();
         break;
      case 1048:
         this.L();
         break;
      case 1051:
         this.G();
         break;
      case 1055:
         this.D();
         break;
      case 1313:
         this.B();
         break;
      case 1336:
         this.J();
         break;
      case 1564:
         this.O();
         break;
      case 1791:
         this.n();
         break;
      case 2071:
         this.K();
         break;
      case 2074:
         this.M();
         break;
      case 2096:
         this.N();
         break;
      case 2368:
         this.S();
         break;
      case 2610:
         this.C();
         break;
      case 2881:
         this.Q();
         break;
      case 3907:
         this.P();
      }

   }

   private void b() {
      this.a.a();
   }

   private void c() {
      this.a.b();
   }

   private void d() throws Exception {
      this.T().c(this.c.n());
      this.T().o();
   }

   private void e() throws Exception {
      this.T().a(this.c.a());
      this.T().o();
   }

   private void f() throws Exception {
      this.T().a(this.c.b());
      this.T().o();
   }

   private void g() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.T().f().d();
      com.aspose.cells.b.a.b.zo var2 = this.c.a();
      this.T().a(new com.aspose.cells.b.a.b.zo(var1.d() + var2.d(), var1.e() + var2.e()));
      this.T().o();
   }

   private void h() throws Exception {
      this.T().a(this.a(this.T().f().e()));
      this.T().o();
   }

   private void i() throws Exception {
      this.a.a(this.c.a());
      this.T().o();
   }

   private void j() throws Exception {
      this.a.a(this.c.b());
      this.T().o();
   }

   private void k() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.V().d();
      com.aspose.cells.b.a.b.zo var2 = this.c.a();
      this.a.a(new com.aspose.cells.b.a.b.zo(var1.d() + var2.d(), var1.e() + var2.e()));
      this.T().o();
   }

   private com.aspose.cells.b.a.b.zt a(com.aspose.cells.b.a.b.zt var1) throws Exception {
      short var2 = this.c.n();
      short var3 = this.c.n();
      short var4 = this.c.n();
      short var5 = this.c.n();
      if (var2 != 0 && var4 != 0) {
         return new com.aspose.cells.b.a.b.zt(var1.b() * (float)var5 / (float)var4, var1.c() * (float)var3 / (float)var2);
      } else {
         throw new Exception("Invalid scale values.");
      }
   }

   private void l() throws Exception {
      this.a.a(this.a(this.V().e()));
      this.T().o();
   }

   private void m() throws Exception {
      zbt var1 = new zbt();
      this.a((zbh)var1);
   }

   private void n() throws Exception {
      zbt var1 = new zbt();
      this.a((zbh)var1);
   }

   private void o() throws Exception {
      zbt var1 = new zbt();
      var1.a(this.c);
      this.a((zbh)var1);
   }

   private void p() throws Exception {
      zbp var1 = new zbp();
      var1.a(this.c);
      this.a((zbh)var1);
   }

   private void q() throws Exception {
      zbr var1 = new zbr();
      var1.a(this.c);
      this.a((zbh)var1);
   }

   private void r() throws Exception {
      zbp var1 = new zbp();
      var1.b(this.c);
      this.a((zbh)var1);
   }

   private void s() throws Exception {
      this.c.r();
      zbp var1 = new zbp();
      var1.c(this.c);
      this.a((zbh)var1);
   }

   private void t() throws Exception {
      long var1 = (long)(this.c.p() & '\uffff');
      this.T().a(var1);
   }

   private void u() throws Exception {
      long var1 = (long)(this.c.p() & '\uffff');
      this.a(var1);
   }

   private void v() throws Exception {
      this.T().a(this.c.e());
   }

   private void w() throws Exception {
      this.T().a(this.c.p() & '\uffff');
   }

   private void x() throws Exception {
      this.T().d(this.c.p() & '\uffff');
   }

   private void y() throws Exception {
      this.T().b(this.c.e());
   }

   private void z() throws Exception {
      this.T().b(this.c.p() & '\uffff');
   }

   private void A() throws Exception {
      short var1 = this.c.n();
      this.T().g(var1);
   }

   private void B() throws Exception {
      int var1 = this.c.p() & '\uffff';
      if (var1 != 0) {
         String var2 = this.c.b(var1);
         if (var1 % 2 > 0) {
            this.c.m();
         }

         com.aspose.cells.b.a.b.zo var3 = this.c.a();
         this.d.a(var3, var2);
      }
   }

   private void C() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.c.a();
      int var2 = this.c.p() & '\uffff';
      if (var2 != 0) {
         short var3 = this.c.n();
         if (var3 != 0) {
            this.c.c();
         }

         String var4 = this.c.b(var2);
         this.d.a(var1, var4);
      }
   }

   private void D() throws Exception {
      Color var1 = this.c.e();
      com.aspose.cells.b.a.b.zo var2 = this.c.a();
      this.d.a(var2, var1);
   }

   private void E() throws Exception {
      this.a.b(this.c.a());
   }

   private void F() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.c.a();
      this.d.a(var1);
      this.a.b(var1);
   }

   private void G() throws Exception {
      this.d.a(this.c.c());
   }

   private void H() throws Exception {
      this.d.a(this.c.f());
   }

   private void I() throws Exception {
      this.d.b(this.c.f());
   }

   private void J() throws Exception {
      this.d.a(this.c.g());
   }

   private void K() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.c.a();
      com.aspose.cells.b.a.b.zo var2 = this.c.a();
      com.aspose.cells.b.a.b.zq var3 = this.c.c();
      this.d.a(var3, var1, var2);
   }

   private void L() throws Exception {
      this.d.c(this.c.c());
   }

   private void M() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.c.a();
      com.aspose.cells.b.a.b.zo var2 = this.c.a();
      com.aspose.cells.b.a.b.zq var3 = this.c.c();
      this.d.b(var3, var1, var2);
   }

   private void N() throws Exception {
      com.aspose.cells.b.a.b.zo var1 = this.c.a();
      com.aspose.cells.b.a.b.zo var2 = this.c.a();
      com.aspose.cells.b.a.b.zq var3 = this.c.c();
      this.d.c(var3, var1, var2);
   }

   private void O() throws Exception {
      com.aspose.cells.b.a.b.zt var1 = this.c.b();
      com.aspose.cells.b.a.b.zq var2 = this.c.c();
      this.d.a(var2, var1);
   }

   private void P() throws Exception {
      this.c.p();
      this.c.p();
      this.c.p();
      this.R();
   }

   private void Q() throws Exception {
      this.c.p();
      this.c.p();
      this.R();
   }

   private void R() throws Exception {
      com.aspose.cells.b.a.b.zq var1 = this.c.d();
      com.aspose.cells.b.a.b.zq var2 = this.c.d();
      int var3 = (int)(this.c.k().h() - this.c.k().i());
      if (var3 >= 1) {
         byte[] var4 = this.c.g(var3);
         byte[] var5 = zbn.o(var4);
         this.d.a(var1, var2, var5);
      }
   }

   private void S() throws Exception {
      this.c.p();
      this.c.p();
      this.c.p();
      this.c.p();
      this.c.p();
      com.aspose.cells.b.a.b.zq var1 = this.c.d();
      this.d.b(var1);
   }

   private void a(zbh var1) throws Exception {
      this.a.g().a(var1);
   }

   private void a(long var1) {
      this.a.g().b(var1);
   }

   private zar T() {
      return this.a.d();
   }

   private zbz U() {
      return this.a.c();
   }

   private com.aspose.cells.b.a.b.zq V() {
      return this.a.e();
   }
}
